package jp.co.toshiba.ffsa.service.common;

import java.util.List;

import jp.co.toshiba.ffsa.entity.User;

public class UserService  extends AbstractService<User> {

    public User findById(String userId) {
        return select().id(userId).getSingleResult();
    }

    public List<User> selectAllPaged(int startIndex,int numItems){
        return findAllPaged("userId", startIndex, numItems);
    }

    public int deleteItem(String userId) {
        User user = findById(userId);
        return removeItem(user);
    }

    public void updateItem(User user){
        update(user);
    }
}